package com.ddone.ioc.annotation.dao.impl;

import com.ddone.ioc.annotation.bean.Book;
import com.ddone.ioc.annotation.dao.BookDao;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @author ddone
 * @date 2024/3/19-18:46
 */
@Repository
@Slf4j
public class BookDaoImpl implements BookDao {
    @Autowired
    private SqlSessionFactory sqlSessionFactory;
    @Override
    public void addBook(Book book) {
      log.warn("调用DAO: AddBook");
      log.warn(sqlSessionFactory.openSession().getConfiguration().getVariables().toString());
    }
}
